using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;
using BLL;
using DTO;
using System.IO;

public partial class ShowAlbum : BasePage
{
    string _dirUrl = "";
    protected string dirUrl
    {
        get { return _dirUrl; }
        set { _dirUrl = value; }
    }
    string _dirPath = "";
    protected string dirPath
    {
        get { return _dirPath; }
        set { _dirPath = value; }
    }
    protected void Page_Init(object sender, EventArgs e)
    {
        int id = int.Parse(this.Request.QueryString["ID"]);
        this.dirUrl = Globals.ApplicationPath + "Upload/Thuvienhinhanh/" + id + "/";
        this.dirPath = Server.MapPath(dirUrl);
        if (!Directory.Exists(dirPath))
            Directory.CreateDirectory(dirPath);
    }
    private void Page_Load(object sender, System.EventArgs e)
    {
        LoadFile();
        //AllowPagingDataList1.ObjDataSource = objImage;
        //AllowPagingDataList1.ObjectControl = dtlImage;
        //AllowPagingDataList1.PageSize = 25;
    }
    private void LoadFile()
    {
        DirectoryInfo dir = new DirectoryInfo(Server.MapPath(dirUrl));
        dtlImage.DataSource = dir.GetFiles("*.*");
        dtlImage.DataBind();
    }
}
